// Licensed under the Apache License, Version 2.0 (the "License"); you may not
// use this file except in compliance with the License. You may obtain a copy of
// the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
// License for the specific language governing permissions and limitations under
// the License.

// This code was generated by google-apis-code-generator 1.5.1

// ----------------------------------------------------------------------------
// NOTE: This file is generated from Google APIs Discovery Service.
// Service:
//   Cloud Storage JSON API (storage/v1)
// Description:
//   Stores and retrieves potentially large, immutable data objects.
// Classes:
//   Bucket
// Documentation:
//   https://developers.google.com/storage/docs/json_api/

#include "google/storage_api/bucket.h"
#include <string>
#include "googleapis/base/integral_types.h"
#include "googleapis/client/data/jsoncpp_data.h"
#include "googleapis/client/util/date_time.h"
#include "googleapis/strings/stringpiece.h"

#include "google/storage_api/bucket_access_control.h"
#include "google/storage_api/object_access_control.h"


#include <string>
#include "googleapis/strings/strcat.h"

namespace google_storage_api {
using namespace googleapis;



// Object factory method (static).
Bucket::BucketBilling* Bucket::BucketBilling::New() {
  return new client::JsonCppCapsule<BucketBilling>;
}

// Standard immutable constructor.
Bucket::BucketBilling::BucketBilling(const Json::Value& storage)
  : client::JsonCppData(storage) {
}

// Standard mutable constructor.
Bucket::BucketBilling::BucketBilling(Json::Value* storage)
  : client::JsonCppData(storage) {
}

// Standard destructor.
Bucket::BucketBilling::~BucketBilling() {
}

// Properties.

// Object factory method (static).
Bucket::BucketCors* Bucket::BucketCors::New() {
  return new client::JsonCppCapsule<BucketCors>;
}

// Standard immutable constructor.
Bucket::BucketCors::BucketCors(const Json::Value& storage)
  : client::JsonCppData(storage) {
}

// Standard mutable constructor.
Bucket::BucketCors::BucketCors(Json::Value* storage)
  : client::JsonCppData(storage) {
}

// Standard destructor.
Bucket::BucketCors::~BucketCors() {
}

// Properties.

// Object factory method (static).
Bucket::BucketEncryption* Bucket::BucketEncryption::New() {
  return new client::JsonCppCapsule<BucketEncryption>;
}

// Standard immutable constructor.
Bucket::BucketEncryption::BucketEncryption(const Json::Value& storage)
  : client::JsonCppData(storage) {
}

// Standard mutable constructor.
Bucket::BucketEncryption::BucketEncryption(Json::Value* storage)
  : client::JsonCppData(storage) {
}

// Standard destructor.
Bucket::BucketEncryption::~BucketEncryption() {
}

// Properties.



// Object factory method (static).
Bucket::BucketLifecycle::BucketLifecycleRule::BucketLifecycleRuleAction* Bucket::BucketLifecycle::BucketLifecycleRule::BucketLifecycleRuleAction::New() {
  return new client::JsonCppCapsule<BucketLifecycleRuleAction>;
}

// Standard immutable constructor.
Bucket::BucketLifecycle::BucketLifecycleRule::BucketLifecycleRuleAction::BucketLifecycleRuleAction(const Json::Value& storage)
  : client::JsonCppData(storage) {
}

// Standard mutable constructor.
Bucket::BucketLifecycle::BucketLifecycleRule::BucketLifecycleRuleAction::BucketLifecycleRuleAction(Json::Value* storage)
  : client::JsonCppData(storage) {
}

// Standard destructor.
Bucket::BucketLifecycle::BucketLifecycleRule::BucketLifecycleRuleAction::~BucketLifecycleRuleAction() {
}

// Properties.

// Object factory method (static).
Bucket::BucketLifecycle::BucketLifecycleRule::BucketLifecycleRuleCondition* Bucket::BucketLifecycle::BucketLifecycleRule::BucketLifecycleRuleCondition::New() {
  return new client::JsonCppCapsule<BucketLifecycleRuleCondition>;
}

// Standard immutable constructor.
Bucket::BucketLifecycle::BucketLifecycleRule::BucketLifecycleRuleCondition::BucketLifecycleRuleCondition(const Json::Value& storage)
  : client::JsonCppData(storage) {
}

// Standard mutable constructor.
Bucket::BucketLifecycle::BucketLifecycleRule::BucketLifecycleRuleCondition::BucketLifecycleRuleCondition(Json::Value* storage)
  : client::JsonCppData(storage) {
}

// Standard destructor.
Bucket::BucketLifecycle::BucketLifecycleRule::BucketLifecycleRuleCondition::~BucketLifecycleRuleCondition() {
}

// Properties.
// Object factory method (static).
Bucket::BucketLifecycle::BucketLifecycleRule* Bucket::BucketLifecycle::BucketLifecycleRule::New() {
  return new client::JsonCppCapsule<BucketLifecycleRule>;
}

// Standard immutable constructor.
Bucket::BucketLifecycle::BucketLifecycleRule::BucketLifecycleRule(const Json::Value& storage)
  : client::JsonCppData(storage) {
}

// Standard mutable constructor.
Bucket::BucketLifecycle::BucketLifecycleRule::BucketLifecycleRule(Json::Value* storage)
  : client::JsonCppData(storage) {
}

// Standard destructor.
Bucket::BucketLifecycle::BucketLifecycleRule::~BucketLifecycleRule() {
}

// Properties.
// Object factory method (static).
Bucket::BucketLifecycle* Bucket::BucketLifecycle::New() {
  return new client::JsonCppCapsule<BucketLifecycle>;
}

// Standard immutable constructor.
Bucket::BucketLifecycle::BucketLifecycle(const Json::Value& storage)
  : client::JsonCppData(storage) {
}

// Standard mutable constructor.
Bucket::BucketLifecycle::BucketLifecycle(Json::Value* storage)
  : client::JsonCppData(storage) {
}

// Standard destructor.
Bucket::BucketLifecycle::~BucketLifecycle() {
}

// Properties.

// Object factory method (static).
Bucket::BucketLogging* Bucket::BucketLogging::New() {
  return new client::JsonCppCapsule<BucketLogging>;
}

// Standard immutable constructor.
Bucket::BucketLogging::BucketLogging(const Json::Value& storage)
  : client::JsonCppData(storage) {
}

// Standard mutable constructor.
Bucket::BucketLogging::BucketLogging(Json::Value* storage)
  : client::JsonCppData(storage) {
}

// Standard destructor.
Bucket::BucketLogging::~BucketLogging() {
}

// Properties.

// Object factory method (static).
Bucket::BucketOwner* Bucket::BucketOwner::New() {
  return new client::JsonCppCapsule<BucketOwner>;
}

// Standard immutable constructor.
Bucket::BucketOwner::BucketOwner(const Json::Value& storage)
  : client::JsonCppData(storage) {
}

// Standard mutable constructor.
Bucket::BucketOwner::BucketOwner(Json::Value* storage)
  : client::JsonCppData(storage) {
}

// Standard destructor.
Bucket::BucketOwner::~BucketOwner() {
}

// Properties.

// Object factory method (static).
Bucket::BucketVersioning* Bucket::BucketVersioning::New() {
  return new client::JsonCppCapsule<BucketVersioning>;
}

// Standard immutable constructor.
Bucket::BucketVersioning::BucketVersioning(const Json::Value& storage)
  : client::JsonCppData(storage) {
}

// Standard mutable constructor.
Bucket::BucketVersioning::BucketVersioning(Json::Value* storage)
  : client::JsonCppData(storage) {
}

// Standard destructor.
Bucket::BucketVersioning::~BucketVersioning() {
}

// Properties.

// Object factory method (static).
Bucket::BucketWebsite* Bucket::BucketWebsite::New() {
  return new client::JsonCppCapsule<BucketWebsite>;
}

// Standard immutable constructor.
Bucket::BucketWebsite::BucketWebsite(const Json::Value& storage)
  : client::JsonCppData(storage) {
}

// Standard mutable constructor.
Bucket::BucketWebsite::BucketWebsite(Json::Value* storage)
  : client::JsonCppData(storage) {
}

// Standard destructor.
Bucket::BucketWebsite::~BucketWebsite() {
}

// Properties.
// Object factory method (static).
Bucket* Bucket::New() {
  return new client::JsonCppCapsule<Bucket>;
}

// Standard immutable constructor.
Bucket::Bucket(const Json::Value& storage)
  : client::JsonCppData(storage) {
}

// Standard mutable constructor.
Bucket::Bucket(Json::Value* storage)
  : client::JsonCppData(storage) {
}

// Standard destructor.
Bucket::~Bucket() {
}

// Properties.

const client::JsonCppArray<BucketAccessControl > Bucket::get_acl() const {
   const Json::Value& storage = Storage("acl");
   return client::JsonValueToCppValueHelper<client::JsonCppArray<BucketAccessControl > >(storage);
}

client::JsonCppArray<BucketAccessControl > Bucket::mutable_acl() {
  Json::Value* storage = MutableStorage("acl");
  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<BucketAccessControl > >(storage);
}

const client::JsonCppArray<ObjectAccessControl > Bucket::get_default_object_acl() const {
   const Json::Value& storage = Storage("defaultObjectAcl");
   return client::JsonValueToCppValueHelper<client::JsonCppArray<ObjectAccessControl > >(storage);
}

client::JsonCppArray<ObjectAccessControl > Bucket::mutable_defaultObjectAcl() {
  Json::Value* storage = MutableStorage("defaultObjectAcl");
  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<ObjectAccessControl > >(storage);
}
}  // namespace google_storage_api
